/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package MortgageCore;

/**
 *
 * @author karakots
 */
public class House implements iProperty {
    private double healthPercent = 100;    // 0 to 100
    private double squareFeet;
    private double houseQ;
    private double purchasePrice;
    private double currentValue;
    private boolean initializationAttempt;
    static double kHouseMaintDollarsPerSqFt = 1.0;
    static double kHouseHealthLossPerMonth = 2.0;

    public double getHouseQ()                       {return houseQ;}
    public void setHouseQ(double hq)                {houseQ = hq;}
    public double getPurchasePrice()                {return purchasePrice;}
    public void setPurchasePrice(double p)          {purchasePrice = p;}
    public boolean getInitializationAttempt()       {return initializationAttempt;}
    public void setInitializationAttempt(boolean b) {initializationAttempt = b;}
    public void setCurrentValue(double v)           {currentValue = v;}
    public double getCurrentValue()                 {return currentValue;}

    public House() {
       squareFeet = 0;
       houseQ = 0;
       purchasePrice = 0;
       initializationAttempt = false;
    }

    // maintaining a house restores its health
    public void maintainProperty(double amount) {
    }

    public double getTransactionCost() {
        return currentValue * 0.1;
    }

    // House wears out with use, and needs to be maintained
    void Wear() {
        if (healthPercent > kHouseHealthLossPerMonth)
            healthPercent -= kHouseHealthLossPerMonth;
    }


}
